(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^3).


The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
minus(0, y) → 0
minus(s(x), y) → if_minus(le(s(x), y), s(x), y)
if_minus(true, s(x), y) → 0
if_minus(false, s(x), y) → s(minus(x, y))
mod(0, y) → 0
mod(s(x), 0) → 0
mod(s(x), s(y)) → if_mod(le(y, x), s(x), s(y))
if_mod(true, s(x), s(y)) → mod(minus(x, y), s(y))
if_mod(false, s(x), s(y)) → s(x)

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted Cpx (relative) TRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
minus(0, z0) → 0
minus(s(z0), z1) → if_minus(le(s(z0), z1), s(z0), z1)
if_minus(true, s(z0), z1) → 0
if_minus(false, s(z0), z1) → s(minus(z0, z1))
mod(0, z0) → 0
mod(s(z0), 0) → 0
mod(s(z0), s(z1)) → if_mod(le(z1, z0), s(z0), s(z1))
if_mod(true, s(z0), s(z1)) → mod(minus(z0, z1), s(z1))
if_mod(false, s(z0), s(z1)) → s(z0)
Tuples:

LE(0, z0) → c
LE(s(z0), 0) → c1
LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(0, z0) → c3
MINUS(s(z0), z1) → c4(IF_MINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IF_MINUS(true, s(z0), z1) → c5
IF_MINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
MOD(0, z0) → c7
MOD(s(z0), 0) → c8
MOD(s(z0), s(z1)) → c9(IF_MOD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_MOD(true, s(z0), s(z1)) → c10(MOD(minus(z0, z1), s(z1)), MINUS(z0, z1))
IF_MOD(false, s(z0), s(z1)) → c11
S tuples:

LE(0, z0) → c
LE(s(z0), 0) → c1
LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(0, z0) → c3
MINUS(s(z0), z1) → c4(IF_MINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IF_MINUS(true, s(z0), z1) → c5
IF_MINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
MOD(0, z0) → c7
MOD(s(z0), 0) → c8
MOD(s(z0), s(z1)) → c9(IF_MOD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_MOD(true, s(z0), s(z1)) → c10(MOD(minus(z0, z1), s(z1)), MINUS(z0, z1))
IF_MOD(false, s(z0), s(z1)) → c11
K tuples:none
Defined Rule Symbols:

le, minus, if_minus, mod, if_mod

Defined Pair Symbols:

LE, MINUS, IF_MINUS, MOD, IF_MOD

Compound Symbols:

c, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11

(3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 7 trailing nodes:

MOD(0, z0) → c7
MOD(s(z0), 0) → c8
LE(0, z0) → c
IF_MINUS(true, s(z0), z1) → c5
IF_MOD(false, s(z0), s(z1)) → c11
MINUS(0, z0) → c3
LE(s(z0), 0) → c1

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
minus(0, z0) → 0
minus(s(z0), z1) → if_minus(le(s(z0), z1), s(z0), z1)
if_minus(true, s(z0), z1) → 0
if_minus(false, s(z0), z1) → s(minus(z0, z1))
mod(0, z0) → 0
mod(s(z0), 0) → 0
mod(s(z0), s(z1)) → if_mod(le(z1, z0), s(z0), s(z1))
if_mod(true, s(z0), s(z1)) → mod(minus(z0, z1), s(z1))
if_mod(false, s(z0), s(z1)) → s(z0)
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IF_MINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IF_MINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
MOD(s(z0), s(z1)) → c9(IF_MOD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_MOD(true, s(z0), s(z1)) → c10(MOD(minus(z0, z1), s(z1)), MINUS(z0, z1))
S tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IF_MINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IF_MINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
MOD(s(z0), s(z1)) → c9(IF_MOD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_MOD(true, s(z0), s(z1)) → c10(MOD(minus(z0, z1), s(z1)), MINUS(z0, z1))
K tuples:none
Defined Rule Symbols:

le, minus, if_minus, mod, if_mod

Defined Pair Symbols:

LE, MINUS, IF_MINUS, MOD, IF_MOD

Compound Symbols:

c2, c4, c6, c9, c10

(5) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

mod(0, z0) → 0
mod(s(z0), 0) → 0
mod(s(z0), s(z1)) → if_mod(le(z1, z0), s(z0), s(z1))
if_mod(true, s(z0), s(z1)) → mod(minus(z0, z1), s(z1))
if_mod(false, s(z0), s(z1)) → s(z0)

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
le(0, z0) → true
minus(0, z0) → 0
minus(s(z0), z1) → if_minus(le(s(z0), z1), s(z0), z1)
if_minus(true, s(z0), z1) → 0
if_minus(false, s(z0), z1) → s(minus(z0, z1))
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IF_MINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IF_MINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
MOD(s(z0), s(z1)) → c9(IF_MOD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_MOD(true, s(z0), s(z1)) → c10(MOD(minus(z0, z1), s(z1)), MINUS(z0, z1))
S tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IF_MINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IF_MINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
MOD(s(z0), s(z1)) → c9(IF_MOD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_MOD(true, s(z0), s(z1)) → c10(MOD(minus(z0, z1), s(z1)), MINUS(z0, z1))
K tuples:none
Defined Rule Symbols:

le, minus, if_minus

Defined Pair Symbols:

LE, MINUS, IF_MINUS, MOD, IF_MOD

Compound Symbols:

c2, c4, c6, c9, c10

(7) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

IF_MOD(true, s(z0), s(z1)) → c10(MOD(minus(z0, z1), s(z1)), MINUS(z0, z1))
We considered the (Usable) Rules:

minus(s(z0), z1) → if_minus(le(s(z0), z1), s(z0), z1)
if_minus(false, s(z0), z1) → s(minus(z0, z1))
if_minus(true, s(z0), z1) → 0
minus(0, z0) → 0
And the Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IF_MINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IF_MINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
MOD(s(z0), s(z1)) → c9(IF_MOD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_MOD(true, s(z0), s(z1)) → c10(MOD(minus(z0, z1), s(z1)), MINUS(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(IF_MINUS(x1, x2, x3)) = 0   
POL(IF_MOD(x1, x2, x3)) = x2   
POL(LE(x1, x2)) = 0   
POL(MINUS(x1, x2)) = 0   
POL(MOD(x1, x2)) = x1   
POL(c10(x1, x2)) = x1 + x2   
POL(c2(x1)) = x1   
POL(c4(x1, x2)) = x1 + x2   
POL(c6(x1)) = x1   
POL(c9(x1, x2)) = x1 + x2   
POL(false) = 0   
POL(if_minus(x1, x2, x3)) = x2   
POL(le(x1, x2)) = 0   
POL(minus(x1, x2)) = x1   
POL(s(x1)) = [1] + x1   
POL(true) = 0   

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
le(0, z0) → true
minus(0, z0) → 0
minus(s(z0), z1) → if_minus(le(s(z0), z1), s(z0), z1)
if_minus(true, s(z0), z1) → 0
if_minus(false, s(z0), z1) → s(minus(z0, z1))
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IF_MINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IF_MINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
MOD(s(z0), s(z1)) → c9(IF_MOD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_MOD(true, s(z0), s(z1)) → c10(MOD(minus(z0, z1), s(z1)), MINUS(z0, z1))
S tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IF_MINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IF_MINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
MOD(s(z0), s(z1)) → c9(IF_MOD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
K tuples:

IF_MOD(true, s(z0), s(z1)) → c10(MOD(minus(z0, z1), s(z1)), MINUS(z0, z1))
Defined Rule Symbols:

le, minus, if_minus

Defined Pair Symbols:

LE, MINUS, IF_MINUS, MOD, IF_MOD

Compound Symbols:

c2, c4, c6, c9, c10

(9) CdtKnowledgeProof (BOTH BOUNDS(ID, ID) transformation)

The following tuples could be moved from S to K by knowledge propagation:

MOD(s(z0), s(z1)) → c9(IF_MOD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_MOD(true, s(z0), s(z1)) → c10(MOD(minus(z0, z1), s(z1)), MINUS(z0, z1))

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
le(0, z0) → true
minus(0, z0) → 0
minus(s(z0), z1) → if_minus(le(s(z0), z1), s(z0), z1)
if_minus(true, s(z0), z1) → 0
if_minus(false, s(z0), z1) → s(minus(z0, z1))
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IF_MINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IF_MINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
MOD(s(z0), s(z1)) → c9(IF_MOD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_MOD(true, s(z0), s(z1)) → c10(MOD(minus(z0, z1), s(z1)), MINUS(z0, z1))
S tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IF_MINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IF_MINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
K tuples:

IF_MOD(true, s(z0), s(z1)) → c10(MOD(minus(z0, z1), s(z1)), MINUS(z0, z1))
MOD(s(z0), s(z1)) → c9(IF_MOD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
Defined Rule Symbols:

le, minus, if_minus

Defined Pair Symbols:

LE, MINUS, IF_MINUS, MOD, IF_MOD

Compound Symbols:

c2, c4, c6, c9, c10

(11) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

IF_MINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
We considered the (Usable) Rules:

minus(s(z0), z1) → if_minus(le(s(z0), z1), s(z0), z1)
if_minus(false, s(z0), z1) → s(minus(z0, z1))
if_minus(true, s(z0), z1) → 0
minus(0, z0) → 0
And the Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IF_MINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IF_MINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
MOD(s(z0), s(z1)) → c9(IF_MOD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_MOD(true, s(z0), s(z1)) → c10(MOD(minus(z0, z1), s(z1)), MINUS(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(IF_MINUS(x1, x2, x3)) = x2   
POL(IF_MOD(x1, x2, x3)) = x22   
POL(LE(x1, x2)) = 0   
POL(MINUS(x1, x2)) = x1   
POL(MOD(x1, x2)) = [1] + x12   
POL(c10(x1, x2)) = x1 + x2   
POL(c2(x1)) = x1   
POL(c4(x1, x2)) = x1 + x2   
POL(c6(x1)) = x1   
POL(c9(x1, x2)) = x1 + x2   
POL(false) = 0   
POL(if_minus(x1, x2, x3)) = x2   
POL(le(x1, x2)) = 0   
POL(minus(x1, x2)) = x1   
POL(s(x1)) = [1] + x1   
POL(true) = 0   

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
le(0, z0) → true
minus(0, z0) → 0
minus(s(z0), z1) → if_minus(le(s(z0), z1), s(z0), z1)
if_minus(true, s(z0), z1) → 0
if_minus(false, s(z0), z1) → s(minus(z0, z1))
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IF_MINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IF_MINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
MOD(s(z0), s(z1)) → c9(IF_MOD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_MOD(true, s(z0), s(z1)) → c10(MOD(minus(z0, z1), s(z1)), MINUS(z0, z1))
S tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IF_MINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
K tuples:

IF_MOD(true, s(z0), s(z1)) → c10(MOD(minus(z0, z1), s(z1)), MINUS(z0, z1))
MOD(s(z0), s(z1)) → c9(IF_MOD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_MINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
Defined Rule Symbols:

le, minus, if_minus

Defined Pair Symbols:

LE, MINUS, IF_MINUS, MOD, IF_MOD

Compound Symbols:

c2, c4, c6, c9, c10

(13) CdtKnowledgeProof (BOTH BOUNDS(ID, ID) transformation)

The following tuples could be moved from S to K by knowledge propagation:

MINUS(s(z0), z1) → c4(IF_MINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IF_MINUS(false, s(z0), z1) → c6(MINUS(z0, z1))

(14) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
le(0, z0) → true
minus(0, z0) → 0
minus(s(z0), z1) → if_minus(le(s(z0), z1), s(z0), z1)
if_minus(true, s(z0), z1) → 0
if_minus(false, s(z0), z1) → s(minus(z0, z1))
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IF_MINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IF_MINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
MOD(s(z0), s(z1)) → c9(IF_MOD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_MOD(true, s(z0), s(z1)) → c10(MOD(minus(z0, z1), s(z1)), MINUS(z0, z1))
S tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
K tuples:

IF_MOD(true, s(z0), s(z1)) → c10(MOD(minus(z0, z1), s(z1)), MINUS(z0, z1))
MOD(s(z0), s(z1)) → c9(IF_MOD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_MINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
MINUS(s(z0), z1) → c4(IF_MINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
Defined Rule Symbols:

le, minus, if_minus

Defined Pair Symbols:

LE, MINUS, IF_MINUS, MOD, IF_MOD

Compound Symbols:

c2, c4, c6, c9, c10

(15) CdtRuleRemovalProof (UPPER BOUND(ADD(n^3)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

LE(s(z0), s(z1)) → c2(LE(z0, z1))
We considered the (Usable) Rules:

minus(s(z0), z1) → if_minus(le(s(z0), z1), s(z0), z1)
if_minus(false, s(z0), z1) → s(minus(z0, z1))
if_minus(true, s(z0), z1) → 0
minus(0, z0) → 0
And the Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IF_MINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IF_MINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
MOD(s(z0), s(z1)) → c9(IF_MOD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_MOD(true, s(z0), s(z1)) → c10(MOD(minus(z0, z1), s(z1)), MINUS(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(IF_MINUS(x1, x2, x3)) = x22   
POL(IF_MOD(x1, x2, x3)) = x2 + x2·x3 + x23   
POL(LE(x1, x2)) = x1   
POL(MINUS(x1, x2)) = x1 + x12   
POL(MOD(x1, x2)) = x1 + x2 + x1·x2 + x13   
POL(c10(x1, x2)) = x1 + x2   
POL(c2(x1)) = x1   
POL(c4(x1, x2)) = x1 + x2   
POL(c6(x1)) = x1   
POL(c9(x1, x2)) = x1 + x2   
POL(false) = 0   
POL(if_minus(x1, x2, x3)) = x2   
POL(le(x1, x2)) = 0   
POL(minus(x1, x2)) = x1   
POL(s(x1)) = [1] + x1   
POL(true) = 0   

(16) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
le(0, z0) → true
minus(0, z0) → 0
minus(s(z0), z1) → if_minus(le(s(z0), z1), s(z0), z1)
if_minus(true, s(z0), z1) → 0
if_minus(false, s(z0), z1) → s(minus(z0, z1))
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IF_MINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IF_MINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
MOD(s(z0), s(z1)) → c9(IF_MOD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_MOD(true, s(z0), s(z1)) → c10(MOD(minus(z0, z1), s(z1)), MINUS(z0, z1))
S tuples:none
K tuples:

IF_MOD(true, s(z0), s(z1)) → c10(MOD(minus(z0, z1), s(z1)), MINUS(z0, z1))
MOD(s(z0), s(z1)) → c9(IF_MOD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_MINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
MINUS(s(z0), z1) → c4(IF_MINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
LE(s(z0), s(z1)) → c2(LE(z0, z1))
Defined Rule Symbols:

le, minus, if_minus

Defined Pair Symbols:

LE, MINUS, IF_MINUS, MOD, IF_MOD

Compound Symbols:

c2, c4, c6, c9, c10

(17) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty

(18) BOUNDS(1, 1)